#include "btree.h"
#include <stdio.h>

int main(void)
{
	int a[] = {6,2,8,4,9,5,7,1,3};
	int n = sizeof a / sizeof a[0];
	NODE* root = NULL;
	int register i = 0;
	for(; i < n; i++)
	{
		btree_insert(&root,a[i]);
	}
	printf("---先序遍历---\n");
	btree_first(root);
	printf("\n");
	printf("---中序遍历---\n");
	btree_mid(root);
	printf("\n");
	printf("---后序遍历---\n");
	btree_later(root);
	printf("\n");

	btree_free(&root);
	return 0;
}
